<template>
    <el-dialog v-model="props.isShow" title="Shipping address" :show-close="false" :center="true">
        <el-form :model="form">
            <el-form-item label="Promotion name" label-width="140px">
                <el-input v-model="form.name" autocomplete="off" />
            </el-form-item>
            <el-form-item label="Zones" label-width="140px">
                <el-select v-model="form.region" placeholder="Please select a zone">
                    <el-option label="Zone No.1" value="shanghai" />
                    <el-option label="Zone No.2" value="beijing" />
                </el-select>
            </el-form-item>
        </el-form>
        <template #footer>
            <span class="dialog-footer">
                <el-button @click="close">Cancel</el-button>
                <el-button type="primary" @click="save">
                    Confirm
                </el-button>
            </span>
        </template>
    </el-dialog>
</template>
  
<script lang="ts" setup>
import { reactive } from 'vue'
const props = defineProps({
    isShow: Boolean,
    rid: String
})
// const dialogFormVisible = computed(() => { props.isShow })

const form = reactive({
    name: '',
    region: ''
})
const emits = defineEmits(["closeSetting", "saveSetting"])
const close = () => {
    emits("closeSetting")
}
const save = () => {
    emits("saveSetting")
}
</script>
<style scoped>
.el-button--text {
    margin-right: 15px;
}

.el-select {
    width: 300px;
}

.el-input {
    width: 300px;
}

.dialog-footer button:first-child {
    margin-right: 10px;
}
</style>
  